package plg.grupo1.Lexico.StateMachineHierarchy;

import plg.grupo1.Lexico.TokenHierarchy.TokenDelimitador;

public class State1 implements State{
	
    private static State1 INSTANCE = null;    
	private State1(){}
	
    private synchronized static void createInstance() {
        if (INSTANCE == null) INSTANCE = new State1();
    }
    
    public static State1 getInstance() {
        if (INSTANCE == null) createInstance();
        return INSTANCE;
    }

	public void goNext(){
		Contexto.addToken(new TokenDelimitador(Contexto.getLexema()));//E
		Contexto.clearLexema();
		Contexto.setCurrentState(State0.getInstance());	
	}    
}